package com.yh.serviceimpl;

import com.yh.dao.UserDao;
import com.yh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Auther: Liang
 * @Date: 2024/5/15 - 05 - 15 - 18:40
 * @Description: com.yh.service
 * @version: 1.0
 */
@Service("userService")
public class UserServiceImpl implements UserService {
   //调用UserDao
    @Autowired
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void editInfo(int uid, String username, String password) {
         userDao.updateUsernameByUid(uid,username);
         userDao.updatePasswordByUid(uid,password);
    }
}
